body {
	margin: 0;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: black;
	overflow: hidden;
}

.loader {
	color: dodgerblue;
	font-size: 1.5em;
	font-family: sans-serif;
	text-transform: uppercase;
	width: 40em;
	height: 3em;
	animation: change-color 10s linear infinite;
}

.loader span {
	animation: moving 2s linear infinite;
	animation-delay: calc((var(--n) - 10) * 0.2s);
	position: absolute;
	height: 3em;
}

@keyframes change-color {
	0% {
		color: dodgerblue;
	}

	20% {
		color: gold;
	}

	40% {
		color: hotpink;
	}

	60% {
		color: lightgreen;
	}

	80% {
		color: mediumpurple;
	}

	100% {
		color: dodgerblue;
	}
}

@keyframes moving {
	0% {
		filter: opacity(0);
		transform: rotate(-180deg);
		left: 100%;
	}

	33% {
		filter: opacity(1);
		transform: rotate(0deg);
		left: 60%;
	}

	66% {
		filter: opacity(1);
		transform: rotate(0deg);
		left: 40%;
	}

	100% {
		filter: opacity(0);
		transform: rotate(180deg);
		left: 0;
	}
}

.loader span:nth-child(1) {
	--n: 1;
}

.loader span:nth-child(2) {
	--n: 2;
}

.loader span:nth-child(3) {
	--n: 3;
}

.loader span:nth-child(4) {
	--n: 4;
}

.loader span:nth-child(5) {
	--n: 5;
}

.loader span:nth-child(6) {
	--n: 6;
}

.loader span:nth-child(7) {
	--n: 7;
}